3.219 \(\int \frac{1+x}{2 x+x^2} \, dx\)

Optimal. Leaf size=12 \[ \frac{1}{2} \log \left (x^2+2 x\right ) \]

[Out]

Log[2*x + x^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0032206, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {628} \[ \frac{1}{2} \log \left (x^2+2 x\right ) \]

Antiderivative was successfully verified.

[In]

Int[(1 + x)/(2*x + x^2),x]

[Out]

Log[2*x + x^2]/2

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{1+x}{2 x+x^2} \, dx &=\frac{1}{2} \log \left (2 x+x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0025538, size = 15, normalized size = 1.25 \[ \frac{\log (x)}{2}+\frac{1}{2} \log (x+2) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + x)/(2*x + x^2),x]

[Out]

Log[x]/2 + Log[2 + x]/2

________________________________________________________________________________________

Maple [A]  time = 0.042, size = 9, normalized size = 0.8 \begin{align*}{\frac{\ln \left ( x \left ( 2+x \right ) \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+x)/(x^2+2*x),x)

[Out]

1/2*ln(x*(2+x))

________________________________________________________________________________________

Maxima [A]  time = 1.11713, size = 14, normalized size = 1.17 \begin{align*} \frac{1}{2} \, \log \left (x^{2} + 2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="maxima")

[Out]

1/2*log(x^2 + 2*x)

________________________________________________________________________________________

Fricas [A]  time = 1.51227, size = 27, normalized size = 2.25 \begin{align*} \frac{1}{2} \, \log \left (x^{2} + 2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="fricas")

[Out]

1/2*log(x^2 + 2*x)

________________________________________________________________________________________

Sympy [A]  time = 0.163188, size = 8, normalized size = 0.67 \begin{align*} \frac{\log{\left (x^{2} + 2 x \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x**2+2*x),x)

[Out]

log(x**2 + 2*x)/2

________________________________________________________________________________________

Giac [A]  time = 1.24889, size = 18, normalized size = 1.5 \begin{align*} \frac{1}{2} \, \log \left ({\left | x + 2 \right |}\right ) + \frac{1}{2} \, \log \left ({\left | x \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="giac")

[Out]

1/2*log(abs(x + 2)) + 1/2*log(abs(x))